import {defineStore} from 'pinia'

export default defineStore('user', {
  state: () => ({
    username: '我是用户名'
  }),
  getters: {
    getName: state => state.username
  },
  actions: {
    updateUserName(newName) {
      this.username = newName || '新名字哦~'
    }
  }
})